<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="/jstl/tld/c-rt.tld"%>
<c:set var="ctx" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.dorg/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>被监护人页面</title>

		<link rel="stylesheet" href="${ctx }/css/style.default.css" type="text/css" />
		<script type="text/javascript" src="${ctx}/js/jquery-1.8.3.js" ></script>
		<script type="text/javascript" src="${ctx}/js/plugins/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="${ctx}/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
		<script type="text/javascript" src="${ctx}/js/plugins/jquery.cookie.js"></script>
		<script type="text/javascript" src="${ctx}/js/plugins/jquery.dataTables.min.js"></script>
		<script type="text/javascript" src="${ctx}/js/plugins/jquery.uniform.min.js"></script>
		<script type="text/javascript" src="${ctx}/js/custom/general.js"></script>
		<script type="text/javascript" src="${ctx}/js/custom/tables.js"></script>
	</head>
	<body class="withvernav">
		<script type="text/javascript">
			$(function(){
				$.ajax({
					type:'post',
					url:'${ctx}/pupil/find',
					dataType:'json',
					async:false,//异步请求改为同步请求
					success:function(data){
						if(data){
							$.each(data,function(i,ele){
								var str = '';
								str += '<tr class="gradeX" id="row'+i+'">'+
		                          '<td align="center"><span class="center">'+
		                            '<input type="checkbox" />'+
		                          '</span></td>'+
		                            '<td>'+ele.name+'</td>'+
		                            '<td class="center">'+ele.sex+'</td>'+
		                            '<td>'+ele.birthday+'</td>'+
		                            '<td class="center">65</td>'+
		                            '<td class="center">'+ele.phone+'</td>'+
		                            '<td>'+ele.address+'</td>'+
		                            '<td><a href="#">修改</a>&nbsp;|&nbsp;<a href="#" onclick="delRow('+i+')">删除</a></td>'+
		                        '</tr>';
		                        $('#tbody').append(str);
							});
						}
					}
				});
			});
			
			function delRow(i){
				$('#row'+i).remove();
			}
		</script>
		<div class="bodywrapper">
			<div class="topheader">
				<div class="left">
					<h1 class="logo">
						桂软.
						<span>老年人监控</span>
					</h1>
					<span class="slogan">后台管理系统</span>

					<div class="search">
						<form action="" method="post">
							<input type="text" name="keyword" id="keyword" value="" placeholder="请输入"/>
							<button class="submitbutton"></button>
						</form>
					</div>
					<!--search-->

					<br clear="all" />

				</div>
				<!--left-->

				<div class="right">
					<!--<div class="notification">
                <a class="count" href="ajax/notifications.html"><span>9</span></a>
        	</div>-->
					<div class="userinfo">
						<img src="${ctx }/images/thumbs/avatar.png" alt="" />
						<span>管理员</span>
					</div>
					<!--userinfo-->

					<div class="userinfodrop">
						<div class="avatar">
							<a href=""><img src="${ctx }/images/thumbs/avatarbig.png" alt="" />
							</a>
							<div class="changetheme">
								切换主题:
								<br />
								<a class="default"></a>
								<a class="blueline"></a>
								<a class="greenline"></a>
								<a class="contrast"></a>
								<a class="custombg"></a>
							</div>
						</div>
						<!--avatar-->
						<div class="userdata">
							<h4>
								Juan
							</h4>
							<span class="email">youremail@yourdomain.com</span>
							<ul>
								<li>
									<a href="editprofile.html">编辑资料</a>
								</li>
								<li>
									<a href="accountsettings.html">账号设置</a>
								</li>
								<li>
									<a href="help.html">帮助</a>
								</li>
								<li>
									<a href="index.html">退出</a>
								</li>
							</ul>
						</div>
						<!--userdata-->
					</div>
					<!--userinfodrop-->
				</div>
				<!--right-->
			</div>
			<!--topheader-->


			<div class="header">
				<ul class="headermenu">
					<li>
						<a href="${ctx }/ic/index"><span class="icon icon-flatscreen"></span>首页</a>
					</li>
					<li class="current">
						<a href="${ctx }/imc/addPupil"><span class="icon icon-pencil"></span>信息管理</a>
					</li>
					<li>
						<a href="messages.html"><span class="icon icon-message"></span>查看消息</a>
					</li>
					<li>
						<a href="reports.html"><span class="icon icon-chart"></span>统计报表</a>
					</li>
				</ul>

			</div>
			<!--header-->

			<div class="vernav2 iconmenu">
				<ul>
					<li class="current">
						<a href="#formsub" class="elements">被监护人管理</a>
						<span class="arrow"></span>
						<ul id="formsub">
							<li>
								<a href="${ctx }/imc/addPupil">添加被监护人</a>
							</li>
							<li class="current">
								<a href="${ctx }/imc/findPupil">查看被监护人</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="#formsub" class="editor">监护人管理</a>
						<span class="arrow"></span>
						<ul id="formsub">
							<li>
								<a href="forms.html">家属</a>
							</li>
							<li>
								<a href="wizard.html">医护人员</a>
							</li>
						</ul>
					</li>
					<!--<li><a href="filemanager.html" class="gallery">文件管理</a></li>-->
					
					<li>
						<a href="widgets.html" class="widgets">设备管理</a>
					</li>
					<li>
						<a href="calendar.html" class="widgets">电子围栏</a>
					</li>
					<li>
						<a href="support.html" class="support">系统设置</a>
					</li>
					<li>
						<a href="#error" class="error">错误页面</a>
						<span class="arrow"></span>
						<ul id="error">
							<li>
								<a href="notfound.html">404错误页面</a>
							</li>
							<li>
								<a href="forbidden.html">403错误页面</a>
							</li>
							<li>
								<a href="internal.html">500错误页面</a>
							</li>
							<li>
								<a href="offline.html">503错误页面</a>
							</li>
						</ul>
					</li>
				</ul>
				<a class="togglemenu"></a>
				<br />
				<br />
			</div>
			<!--leftmenu-->

			<div class="centercontent tables">
    
		        <div class="pageheader notab">
		            <h1 class="pagetitle">被监护人信息</h1>
		            <span class="pagedesc">管理被监控人员的身份信息以及与被监控人员相关的其它信息，并对后台数据库中被监控人员信息进行增加、删除、更改和查找</span>
		            
		        </div><!--pageheader-->
		        
		        <div id="contentwrapper" class="contentwrapper">
		          		<div class="contenttitle2">
		                	<h3>被监护人信息的数据列表</h3>
		                </div><!--contenttitle-->
		                <ul class="buttonlist">
	                   		<li><a href="${ctx }/imc/addPupil" class="btn btn_blue btn_search radius50"><span>添加被监控人员</span></a></li>
	                   		<li><a href="" class="btn btn_trash btn_orange"><span>回收站</span></a></li>
	                    </ul>
		                <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable2">
		                    <colgroup>
		                        <col class="con0" style="width: 4%" />
		                        <col class="con1" />
		                        <col class="con0" />
		                        <col class="con1" />
		                        <col class="con0" />
		                    </colgroup>
		                    <thead>
		                        <tr>
		                          <th class="head0 nosort">&nbsp;</th>
		                            <th class="head0">姓名</th>
		                            <th class="head1">性别</th>
		                            <th class="head0">出生日期</th>
		                            <th class="head1">年龄</th>
		                            <th class="head1">联系电话</th>
		                            <th class="head0">家住地址</th>
		                            <th class="head1 nosort center">操作</th>
		                        </tr>
		                    </thead>
		                    
		                    <tbody id="tbody">
		                    </tbody>
		                </table>
		        
		        </div><!--contentwrapper-->
		        
			</div><!-- centercontent -->


		</div>
		<!--bodywrapper-->

	</body>
</html>
